package chap3.Task;
import java.util.Scanner;
public class Task10 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入购物金额:");
        double a = input.nextDouble();
        int b;
        if (a > 200) {
            System.out.print("请输入换购金额:");
            b = input.nextInt();
            if (b == 38) {
                System.out.println("换购商品为1瓶进口红酒,实际支付金额为:" + (a + b));
            } else if (b == 15) {
                System.out.println("换购商品为1袋面粉,实际支付金额为:" + (a + b));
            } else if (b == 4) {
                System.out.println("换购商品为1瓶炫迈口香糖,实际支付金额为:" + (a + b));
            } else if (b == 2) {
                System.out.println("换购商品为1000毫升果汁,实际支付金额为:" + (a + b));
            } else if (b == 1) {
                System.out.println("换购商品为500毫升可乐,实际支付金额为:" + (a + b));
            } else {
                System.out.println("不参加换购活动");
            }
        } else if (a > 100) {
            System.out.print("请输入换购金额:");
            b = input.nextInt();
            if (b == 4) {
                System.out.println("换购商品为1瓶炫迈口香糖,实际支付金额为:" + (a + b));
            } else if (b == 2) {
                System.out.println("换购商品1000毫升果汁,实际支付金额为:" + (a + b));
            } else if (b == 1) {
                System.out.println("换购商品为500毫升可乐,实际支付金额为:" + (a + b));
            } else {
                System.out.println("不参加换购活动");
            }
        } else if (a > 50) {
            System.out.print("请输入换购金额:");
            b = input.nextInt();
            if (b == 1) {
                System.out.println("换购商品为500毫升可乐,实际支付金额为:" + (a + b));
            } else {
                System.out.println("不参加换购活动");
            }
        } else {
            System.out.println("消费金额不足，无法参加换购活动");
        }
    }
}

